package com.example.research.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HomeController {
    
    private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
    
    @GetMapping("/")
    public ModelAndView index() {
        logger.info("访问主页");
        logger.debug("正在解析视图: home/index");
        ModelAndView modelAndView = new ModelAndView("home/index");
        logger.debug("视图解析完成");
        return modelAndView;
    }
    
    @GetMapping("/home")
    public ModelAndView home() {
        logger.info("访问home页面");
        logger.debug("正在解析视图: home/index");
        ModelAndView modelAndView = new ModelAndView("home/index");
        logger.debug("视图解析完成");
        return modelAndView;
    }
} 